<template>
    <el-row class="tac">
        <el-col :span="24">
            <el-menu
                default-active="2"
                class="el-menu-vertical-demo"
                background-color="#545c64"
                text-color="#fff"
                active-text-color="#ffd04b">   

                <myitem
                    v-for="(item) in menuData"
                    :key="item.menuId"
                    :item="item" />
            </el-menu>
        </el-col>
    </el-row>
</template>
<script>
import myitem from "./Myitem.vue"
export default{
    components:{
        myitem
    },
    data() {
        return {
          menuData: []
        }
    },
    created() {
        this.getAllMenu();
    },
    methods: {
        getAllMenu() {
            this.$axios.post(
                "/menu/getAllMenu"
            ).then(res => {
                this.menuData = res.data;
                console.log("菜单",this.menuData)
            })
        }
    }
}
</script>
